git pull
cd /usr/local/code/moses-saas/back/
echo JAVA RUN START;
rm -rf ./target/**
mvn clean package
cd ./target/yzcrm-release/yzcrm/
./yzcrm.sh restart
#echo REMOVE ROOT;
#rm -rf /usr/tomcat/apache-tomcat-9.0.8/webapps/ROOT
#rm -rf /usr/tomcat/apache-tomcat-9.0.8/webapps/ROOT.war
#echo COPY JAVA PACKAGE
#cp /usr/local/code/moses-saas/target/ROOT.war /usr/tool/tomcat/apache-tomcat-9.0.8/webapps
echo MVN SUCCESS;

echo WEB RUN START;
cd /usr/local/code/moses-saas/front/ux/
git pull
cnpm install
cnpm run build
echo COPY WEB PACKAGE
mkdir /usr/local/code/web_back
rm -rf /usr/local/code/web_back/*
cp -r /usr/local/code/web/* /usr/local/code/web_back
rm -rf /usr/local/code/web/*
cp -r /usr/local/code/moses-saas/front/ux/dist/* /usr/local/code/web
echo BUILD PACKAGE

